//
//  ZhuyeCollCell.m
//  Hand-held_kitchen
//
//  Created by 张张烨 on 16/1/23.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "ZhuyeCollCell.h"



@implementation ZhuyeCollCell
-(void)dealloc
{
    [_tupian release];
    [_mingzi release];
    [_jianjie release];
    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    
    
    self = [super initWithFrame:frame];
    if (self) {
        self.tupian = [[UIImageView alloc]init];
        [self.contentView addSubview:_tupian];
        [_tupian release];
        
        self.mingzi = [[UILabel alloc]init];
        _mingzi.font = [UIFont systemFontOfSize:15];
        _mingzi.textColor = [UIColor whiteColor];
        _mingzi.textAlignment = NSTextAlignmentRight;
        [self.contentView addSubview:_mingzi];
        [_mingzi release];
        
        self.mingzi1 = [[UILabel alloc]init];
        _mingzi1.font = [UIFont systemFontOfSize:15];
        _mingzi1.textColor = [UIColor whiteColor];
        _mingzi1.textAlignment = NSTextAlignmentLeft;
        [self.contentView addSubview:_mingzi1];
        [_mingzi1 release];
        
        self.jianjie = [[UILabel alloc]init];
        _jianjie.font = [UIFont systemFontOfSize:13];
        _jianjie.textColor = [UIColor whiteColor];
        _jianjie.textAlignment = NSTextAlignmentRight;
        [self.contentView addSubview:_jianjie];
        [_jianjie release];
        
        self.jianjie1 = [[UILabel alloc]init];
        _jianjie1.font = [UIFont systemFontOfSize:13];
        _jianjie1.textColor = [UIColor whiteColor];
        _jianjie1.textAlignment = NSTextAlignmentLeft;
        [self.contentView addSubview:_jianjie1];
        [_jianjie1 release];
    }
    return self;
}

-(void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    _tupian.frame = CGRectMake(0, 0, layoutAttributes.size.width - (20* KUAN), 140*GAO);
    _mingzi.frame = CGRectMake(0, 70* GAO, 340* KUAN, 35*GAO);
    _jianjie.frame = CGRectMake(0, 95* GAO, 340* KUAN, 30 *GAO);
    _mingzi1.frame = CGRectMake(0, 70* GAO, 340* KUAN, 35 * GAO);
    _jianjie1.frame = CGRectMake(0, 95 * GAO
                                 , 340* KUAN, 30 *GAO);
    
}
@end
